home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Devices / Qwertytunes / BigEasyDialogs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-03  |  1.9 KB  |  79 lines  |  [TEXT/KAHL]

  1. /*
  2.     File:        BigEasyDialogs.h
  3.  
  4.     Contains:    xxx put contents here xxx
  5.  
  6.     Written by:    xxx put writers here xxx
  7.  
  8.     Copyright:    © 1992 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <2>      4/3/92    dvb        New calls for getting text & numbers.
  13.          <1>     1/20/92    dvb        first checked in
  14.  
  15. */
  16.  
  17. /* file: BigEasyDialogs.h
  18.  *
  19.  * Started 2 January 1992, more or less.
  20.  *
  21.  */
  22.  
  23.  
  24.  
  25. /*--------------------------
  26.     Inclusions
  27. --------------------------*/
  28.  
  29. /*--------------------------
  30.     Types
  31. --------------------------*/
  32.  
  33. typedef void (*beDialogUpdate)(long refcon,const Rect *updateRect);
  34. typedef void (*beDialogKey)(long refcon,short key,short mods);
  35. typedef void (*beDialogClick)(long refcon,Point p,short mods);
  36. typedef void (*beDialogIdle)(long refcon);
  37.  
  38.  
  39. typedef struct
  40.     {
  41.     short count;
  42.     short defaultButton;        /* highlighted, and <return> hits it */
  43.     short cancelButton;            /* cmd-. or 'escape' hits it */
  44.     struct
  45.         {
  46.         Str31 name;
  47.         char key;                /* cmd-key for the button, or 0 for none */
  48.         } button[5];
  49.     } EasyDialogButtonList;
  50.  
  51. #define kEasyDialogOkay ((EasyDialogButtonList *)-1)
  52. #define kEasyDialogOkayCancel ((EasyDialogButtonList *)-2)
  53. #define kEasyDialogCancelOkay ((EasyDialogButtonList *)-3)
  54. #define kEasyDialogSaveDiscardCancel ((EasyDialogButtonList *)-4)
  55.  
  56. /*--------------------------
  57.     Routines
  58. --------------------------*/
  59.  
  60. long EasyDialog(Rect *windowRect,
  61.         beDialogUpdate updateProc,
  62.         beDialogKey keyProc,
  63.         beDialogClick clickProc,
  64.         beDialogIdle idleProc,
  65.         EasyDialogButtonList *buttonList,
  66.         long refcon);
  67.  
  68. short EasyDialogMessage(short iconID,
  69.         StringPtr header,StringPtr body,
  70.         EasyDialogButtonList *buttonList);
  71.  
  72. Boolean EasyDialogGetString(const StringPtr dialogTitle,
  73.         const StringPtr dialogPrompt,
  74.         StringPtr inOutString,short maxInOutStringLength);
  75.  
  76. Boolean EasyDialogGetNumber(const StringPtr dialogTitle,
  77.         const StringPtr dialogPrompt,
  78.         long *inOutNumber);
  79.